package homework;
import java.util.Random;
import java.util.Scanner;
public class Domo7 {
        public static void main(String[] args) {
            Random in=new Random(1);
            int a= in.nextInt(101);
            Scanner sc=new Scanner(System.in);
            for (int i = 1; i <=100 ; i++) {
                System.out.println("请输入数字");
                int b = sc.nextInt();
                if (a == b) {
                    System.out.println("程序结束！");
                    if(i==1){
                        System.out.println("你真厉害，一次就猜对了！");
                        break;
                    }
                    else if((i>=2)&&(i<=4)){
                        System.out.println("你很聪明，猜对了！");
                        break;
                    }
                    else if((i>=5)&&(i<=100)){
                        System.out.println("笨蛋，你猜这么多次！");
                        break;
                    }}

            }


        }

    }
